/**
 * 
 */
package com.roshan.web.dto;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * The Class TenantSecurityQuestionDetail.
 * 
 * @author roshan
 */
public class TenantSecurityQuestionDetail implements Serializable {

    /** The Constant serialVersionUID. */
    private static final long serialVersionUID = 100L;

    /** The ws communication status. */
    private WSCommunicationStatus wsCommunicationStatus;

    /** The mfa question objects. */
    private List<MfaQuestionFormObject> mfaQuestionFormObjects = new ArrayList<MfaQuestionFormObject>();

    /** The partner uri. */
    private String partnerUri;

    /** The tenant uri. */
    private String tenantUri;

    /**
     * Gets the ws communication status.
     * 
     * @return the ws communication status
     */
    public WSCommunicationStatus getWsCommunicationStatus() {
        return this.wsCommunicationStatus;
    }

    /**
     * Sets the ws communication status.
     * 
     * @param wsCommunicationStatus the new ws communication status
     */
    public void setWsCommunicationStatus(WSCommunicationStatus wsCommunicationStatus) {
        this.wsCommunicationStatus = wsCommunicationStatus;
    }

    /**
     * Gets the mfa question.
     * 
     * @return the mfa question
     */
    public List<String> getMfaQuestion() {

        List<String> mfaQuestion = new ArrayList<String>();
        for (MfaQuestionFormObject mfaQuestionFormObject : mfaQuestionFormObjects) {
            if (mfaQuestionFormObject.isNewQuestion()) {
                mfaQuestion.add(mfaQuestionFormObject.getMfaQuestion());
            }
        }

        return mfaQuestion;
    }

    /**
     * Gets the partner uri.
     * 
     * @return the partner uri
     */
    public String getPartnerUri() {
        return this.partnerUri;
    }

    /**
     * Sets the partner uri.
     * 
     * @param partnerUri the new partner uri
     */
    public void setPartnerUri(String partnerUri) {
        this.partnerUri = partnerUri;
    }

    /**
     * Gets the tenant uri.
     * 
     * @return the tenant uri
     */
    public String getTenantUri() {
        return this.tenantUri;
    }

    /**
     * Sets the tenant uri.
     * 
     * @param tenantUri the new tenant uri
     */
    public void setTenantUri(String tenantUri) {
        this.tenantUri = tenantUri;
    }

    /**
     * Gets the mfa question form objects.
     * 
     * @return the mfa question form objects
     */
    public List<MfaQuestionFormObject> getMfaQuestionFormObjects() {
        return mfaQuestionFormObjects;
    }

    /**
     * Sets the mfa question form objects.
     * 
     * @param mfaQuestionFormObjects the new mfa question form objects
     */
    public void setMfaQuestionFormObjects(List<MfaQuestionFormObject> mfaQuestionFormObjects) {
        this.mfaQuestionFormObjects = mfaQuestionFormObjects;
    }

    /**
     * Gets the answered mfa questions.
     * 
     * @return the answered mfa questions
     */
    public List<String> getAnsweredMfaQuestions() {
        List<String> answeredMfaQuestions = new ArrayList<String>();
        for (MfaQuestionFormObject mfaQuestionFormObject : mfaQuestionFormObjects) {
            if (!mfaQuestionFormObject.isNewQuestion()) {
                answeredMfaQuestions.add(mfaQuestionFormObject.getMfaQuestion());
            }
        }
        return answeredMfaQuestions;
    }
}
